package com.kd.juhaowan.view;

import android.content.Context;
import android.util.AttributeSet;

import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.shape.RoundedCornerTreatment;
import com.google.android.material.shape.ShapeAppearanceModel;

public class CommentImageView extends ShapeableImageView {


    public CommentImageView(Context context) {
        super(context);

        setScaleType(ScaleType.CENTER_CROP);
        setShapeAppearanceModel(ShapeAppearanceModel.builder().setAllCorners(new RoundedCornerTreatment()).setAllCornerSizes(8).build());
    }

    public CommentImageView(Context context, AttributeSet attr) {
        super(context, attr);

        setScaleType(ScaleType.CENTER_CROP);
        setShapeAppearanceModel(ShapeAppearanceModel.builder().setAllCorners(new RoundedCornerTreatment()).setAllCornerSizes(8).build());

    }

    public CommentImageView(Context context, AttributeSet attr, int defStyle) {
        super(context, attr, defStyle);
        setScaleType(ScaleType.CENTER_CROP);
        setShapeAppearanceModel(ShapeAppearanceModel.builder().setAllCorners(new RoundedCornerTreatment()).setAllCornerSizes(8).build());

    }
}
